from meiduo_mall.utils.secret import SecretOauth
from django.conf import settings

def generate_verify_email_url(request):
    # user_id  email
    data_dict = {
        'user_id':request.user.id,
        'email':request.user.email
    }
    # 将参数加密
    dumps_data = SecretOauth().dumps(data_dict)
    # 拼接完整的激活路由
    verify_url = settings.EMAIL_VERIFY_URL + dumps_data

    return verify_url